---------------------------------  Varius ---------------------------------

-- Send notify.
function SlobNotify(str)
	if GAMEMODE.IsSandboxDerived then
		GAMEMODE:AddNotify(str, NOTIFY_CLEANUP, 5 )
	else
		LocalPlayer():ChatPrint(str)
	end
	print(str)
end

-- Returns if ent is visible.
function BotVisible(ent)
	local trace = {start = minge:GetShootPos(),endpos = HeadPosition(ent),filter = {minge, ent},mask = 1174421507}
	local tr = util.TraceLine(trace)
	if tr.Fraction == 1 then
		return true
	else
	    return false
	end
end

-- Spam the server

concommand.Add("wots_megaspam", function()
	if GetConVarNumber("wots_IsMegaspam") == 0 then
		SlobNotify("Toggle Mega spam: ON")
		hook.Add("Think", "Megaspam", function()
			RunConsoleCommand("say", "MINGE INVASION IS COMING "..math.random(1, 1337).." MINGES WILL DOMINATE GMOD")
		end)
		RunConsoleCommand("wots_IsMegaspam","1")
	else
		SlobNotify("Toggle Mega spam: OFF")
		hook.Remove("Think", "Megaspam")
		RunConsoleCommand("wots_IsMegaspam","0")
	end
end)
------------------------------------------------------------------------------